﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace YXShop.Common
{
    public class SMS
    {
        /// <summary>
        /// 调用接口发送短信
        /// </summary>
        /// <param name="phone"></param>
        /// <param name="message"></param>
        /// <param name="sendid">发送着ID</param>
        /// <param name="sendtype">1表示手动对客人发送短信，2表示发送短信验证码，其他待添加</param>
        /// <returns></returns>
        public static int SendSMS(string phone, string message, int sendid, int sendtype)
        {
            YXShop.Model.SystemInfo.SMS s = new Model.SystemInfo.SMS();
            s.Phone = phone;
            s.Message = message;
            s.Sendid = sendid;
            s.Sendtype = sendtype;
            s.Sendstatus = 1;
            s.Sendtime = DateTime.Now;
            YXShop.BLL.SystemInfo.SMS sBLL = new BLL.SystemInfo.SMS();
            sBLL.Add(s);

            //调用发送接口
            return 0;
        }
    }
}
